<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:outputStylesheet library="css" name="default.css"/>
    <h:head>
        <title>Mantenimiento de Directores</title>
    </h:head>
    <h:body >
        <h:form id="form2">
           <p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />
            <h:panelGrid columns="4" columnClasses="alinder,alinizq,alinder,alinizq">
                
                <p:outputLabel value="Id" for="dir001" styleClass="requiredLbl" />
                <p:inputText value="#{ctrDirectores.activeReg.ccodigo}" label="Id" id="dir001"  size="10"  disabled="#{not ctrDirectores.lnuevo}">
                     <f:validateLength maximum="10" />
                </p:inputText>
                <h:panelGroup/><h:panelGroup/>
             
                <p:outputLabel value=" Nombre" for="dir002" styleClass="requiredLbl"/>
                <p:inputText value="#{ctrDirectores.activeReg.cnombre}" id="dir002" required="true" size="30" label="Nombre">
                    <f:validateLength maximum="30" />
                 </p:inputText>
               
             
                <p:outputLabel value=" Apellidos" for="dir003" styleClass="requiredLbl"/>
                <p:inputText value="#{ctrDirectores.activeReg.capellidos}" id="dir003" required="true" size="30" label="Apellidos">
                    <f:validateLength maximum="30" />
                </p:inputText>
            
                <p:outputLabel value="Despacho" for="dir004" styleClass="optionalLbl"/>
                <p:inputText value="#{ctrDirectores.activeReg.cdespacho}" id="dir004" size="10">
                    <f:validateLength maximum="10" />
                </p:inputText>
              
          
                <p:outputLabel value="Teléfono" for="dir005" styleClass="optionalLbl"/>
                <p:inputText value="#{ctrDirectores.activeReg.ctelefono}" id="dir005" size="10">
                    <f:validateLength maximum="10" />
                 </p:inputText>
             
                <p:outputLabel value=" E-mail" for="dir006" styleClass="optionalLbl"/>
                <p:inputText value="#{ctrDirectores.activeReg.cmail}" id="dir006" size="40">
                    <f:validateLength maximum="40" />
                     <f:validator validatorId="emailValidator" />
                 </p:inputText>
                <h:panelGroup/><h:panelGroup/>
              
                <h:panelGroup/><h:panelGroup/><h:panelGroup/><h:panelGroup/> 
                <h:panelGroup/><h:panelGroup/><h:panelGroup/><h:panelGroup/>      
                <h:panelGroup/><h:panelGroup/><h:panelGroup/><h:panelGroup/>
                <h:panelGroup/><h:panelGroup/><h:panelGroup/><h:panelGroup/>
                <h:panelGroup/><h:panelGroup/><h:panelGroup/><h:panelGroup/>
                <h:panelGroup/><h:panelGroup/><h:panelGroup/><h:panelGroup/>
                <h:panelGroup/><h:panelGroup/><h:panelGroup/><h:panelGroup/>
                
                <p:commandButton actionListener="#{ctrDirectores.save}" value="Save" id="saveDir"/>
                <p:commandButton value="Delete" actionListener="#{ctrDirectores.delete}" id="deleteDir" rendered="#{not ctrDirectores.lnuevo}" >
                     <p:confirm header="Confirmación" message="¿Esta seguro que quiere borrar este alumno?" icon="ui-icon-alert" />
                </p:commandButton>
 
                <p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
                    <p:commandButton value="Si" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
                    <p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
                </p:confirmDialog>
        
           </h:panelGrid>

         </h:form>
    </h:body>
</html>

